package com.foogui;

import java.util.*;
import java.util.stream.Collectors;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        List<String> words = Arrays.asList("Modern", "Java", "1n", "Action");
        List<Character> collect = words.stream()
                .map(ele -> ele.charAt(0))
                .collect(Collectors.toList());
        System.out.println(collect);
        ArrayList<String> list = new ArrayList<>();
        list.add("Java");
        list.add("1ava");
        list.add("Java");
        list.removeIf(ele -> Character.isDigit(ele.charAt(0)));
        System.out.println(list);

        HashMap<String, String> map = new HashMap<>();
        map.put("1", "1");
        map.put("2", "2");
        map.put("3", "3");
        map.forEach((k,v)-> System.out.println("key is"+k+",value is"+v));
    }
}
